import request from '@/utils/request'

// 查询商户的资金流水列表
export function listMerchantCapital(query) {
  return request({
    url: '/business/merchantCapital/list',
    method: 'get',
    params: query
  })
}

// 查询商户的资金流水详细
export function getMerchantCapital(id) {
  return request({
    url: '/business/merchantCapital/' + id,
    method: 'get'
  })
}
// 查询商户目前余额
export function getMyMerchantBalance() {
  return request({
    url: '/business/merchantCapital/getMyMerchantInfo/',
    method: 'get'
  })
}
// 查询商户所有充值金额
export function getAllMerchantRechargeBalance() {
  return request({
    url: '/business/merchantCapital/getAllMerchantRechargeBalance/',
    method: 'get'
  })
}
// 查询当前登录人的 所有充值金额
export function getMyMerchantRechargeBalance(id) {
  return request({
    url: '/business/merchantCapital/getMyMerchantRechargeInfo/' + id,
    method: 'get'
  })
}


// 新增商户的资金流水
export function addMerchantCapital(data) {
  return request({
    url: '/business/merchantCapital',
    method: 'post',
    data: data
  })
}

// 修改商户的资金流水
export function updateMerchantCapital(data) {
  return request({
    url: '/business/merchantCapital',
    method: 'put',
    data: data
  })
}

// 删除商户的资金流水
export function delMerchantCapital(id) {
  return request({
    url: '/business/merchantCapital/' + id,
    method: 'delete'
  })
}
